
<!doctype html>
<html>
<head>
<title>商户管理系统</title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta name="MobileOptimized" content="240" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="__CSS__/public.css" media="all" />
<link rel="stylesheet" type="text/css" href="__CSS__/home.css" media="all" />
<script src="__JS__/jquery-2.1.0.min.js"></script>
</head>

<body class="body" style="background-size:120%;">
	<div class="page_top_box">
        <div class="pg_name">酒都麻将商户管理系统</div>
        <div class="tb">
           <div>
               <span style="text-align: left;padding-right: 20%">电话号码：
               <b><?php echo $User_Profile['phone'] ?></b></span>
               <span><a style="color: #333;font-weight: bold;font-size: 1.1em;float: right;" onclick="if(!confirm('是否退出')){return false;}" href="<?php echo '__ROOT__/logint' ?>">退出</a>
               </span>
            </div>
            <div>
               <span style="text-align: left;">商 户 I D：
               <b><?php echo $User_Profile['accounts'] ?></b></span>
               <span style="float: right;">我的代理数量 <b><?php echo $underling==""?0:$underling; ?></b> 人</span>
            </div>
            <div>
               <span  style="text-align: left;">钻石数量：<b><?php echo $User_Profile['gems'] ?></b></span>
               <span style="float: right;">我今日充值量
                <b><?php if($sum==""){ echo '0';}if($sum!=""){ echo $sum; }?></b> 个
                </span>
           </div>
           <?php if($_SESSION['agencylv']<=10){
           echo '<div>
               <span  style="text-align: left;">下级返利：<b>'.$first.'%</b></span>
               <span style="float: right;">下下级返利：<b>'.$second.'%</b></span>
           </div>';
           }
           ?>
           <?php if($_SESSION['agencylv']==0){
           echo '<div>
               <span  style="text-align: left;">固定返利：<b>'.$disbate.'%</b></span>
           </div>';
           }
           ?>
        </div>
    </div>
    <div class="marq_info">
        <marquee scrollamount="5" scrolldelay="100" onMouseOut="this.start()" onMouseOver="this.stop()">
                <span style=" color:#BC5757;"><?php  echo $message['content'] ?></span>
        </marquee>
    </div>
        
   
    <ul class="h_nav_btn" style="margin-top:10px;">
        <?php 
        if($purview['searchplayer']==1 || $_SESSION['agencylv']==100) {echo'
        <li>
        	<div style="background-color:#BF3493;">
                <a href="__ROOT__/Searchplayer.html">
            		<img src="__IMG__/home_btn_ico10.png" /><br /><span class="t">玩家充钻</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['creatuser']==1 || $_SESSION['agencylv']==100) {echo'
        <li>
        	<div style="background-color:#06923b;">            
                <a  href="__ROOT__/creatuser.html" onclick="return checkAgent()">        		
    			<img src="__IMG__/home_btn_ico11.png" /><br /><span class="t">添加代理</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['myadmin']==1 || $_SESSION['agencylv']==100) {echo'
		<li>
        	<div style="background-color:#2198db;">            
                <a href="__ROOT__/myadmin.html">
            		<img src="__IMG__/home_btn_ico3.png" /><br /><span class="t">我的代理</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['playercharge']==1 || $_SESSION['agencylv']==100) {echo'
       <li>
        	<div style="background-color:#1A4B70;">            
                <a href="__ROOT__/playercharge.html">
            		<img src="__IMG__/home_btn_ico8.png" /><br /><span class="t">赠送玩家记录</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['agentcharge']==1 || $_SESSION['agencylv']==100) {echo'
		<li>
        	<div style="background-color:#a551ff;">            
                <a href="__ROOT__/agentcharge.html">
            		<img src="__IMG__/home_btn_ico4.png" /><br /><span class="t">代理买钻记录</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['buygold']==1 || $_SESSION['agencylv']==100) {echo'	
        <li>
        	<div style="background-color:#fc9e02;">       
                <a href="__ROOT__/buygold.html">
            		<img src="__IMG__/home_btn_ico5.png" /><br /><span class="t">我的购钻记录</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['myinfo']==1 || $_SESSION['agencylv']==100) {echo'
         <li>
        	<div style="background-color:#1189AD;">            
                <a href="__ROOT__/myinfo.html">
            		<img src="__IMG__/home_btn_ico2.png" /><br /><span class="t">我的信息</span>
                </a>
            </div>
        </li>	
        '; } ?>
        <?php 
        if($purview['policy']==1 || $_SESSION['agencylv']==100) {echo'	
    	<li>
        	<div style="background-color:#dc2227;">            
                <a href="__ROOT__/policy.html">
            		<img src="__IMG__/home_btn_ico1.png" /><br /><span class="t">代理政策</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['subordinate']==1) {echo'
        <li>
        	<div style="background-color:#00B500;">            
                <a href="__ROOT__/subordinate.html">
            		<img src="__IMG__/home_btn_ico6.png" /><br /><span class="t">我的下级返利</span>
                </a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['setnotice']==1 || $_SESSION['agencylv']==100) {echo'
        <li>
            <div style="background-color:#603;"> 
				<a href="__ROOT__/setnotice.html">
						<img src="__IMG__/home_btn_ico9.png" /><br /><span class="t">消息通知</span>
				</a>
            </div>
        </li>
        '; } ?>
        <?php 
        if($purview['policyedit']==1 || $_SESSION['agencylv']==100) {echo'
		 <li>
            <div style="background-color:#7E57A4;">  
					<a href="__ROOT__/policyedit.html">
						<img src="__IMG__/home_btn_ico7.png" /><br /><span class="t">政策管理</span>
					</a>
			</div>
        </li>
        '; } ?>
        <?php 
        if($purview['payoff']==1 || $_SESSION['agencylv']==100) {echo'
		<li>
        	<div style="background-color:#423345;">            
                <a href="__ROOT__/payoff.html">
            		<img src="__IMG__/home_btn_ico7.png" /><br /><span class="t">微信充值</span>
                </a>
            </div>
        </li>
        '; } ?>
        </ul>
    
    <div id="hintbox" class="hint_box">
       <span id="hintmsg"></span>
    </div>
    
    

    <script type="text/javascript">
		function checkAgent(){
			$.ajax({
				url:"tongzhi.html?ac=ajax.class&do=agnum&agid=544677&" + Math.random(),
				success:function(result){
					if(result == 1)
						 window.location.href = "creatuser.php";
					else
						hintPop("您添加的代理人数已达到上限！");
						
					return false;			
				}
			});
		}
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>
</body>
</html>